<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
  <thead>
    <tr>
      <th>Status</th>
      <th>Build Number</th>
      <th>Started</th>
      <th>Branch/Sha</th>
      <th>Trigger</th>
    </tr>
  </thead>
  <tbody>
    <% project.builds.each do |build| %>
      <% url = "/projects_erb/#{project.id}/builds/#{build.number}" %>
      <tr style="cursor: pointer;">
        <td onclick="location.href='<%= url %>'">
          <%= erb(:"../../build/views/build_status", locals: { status: build.status }) %>
        </td>
        <td style="text-align: center;" onclick="location.href='<%= url %>'">
          <%= build.number %>
        </td>
        <td onclick="location.href='<%= url %>'">
          <%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %>
        </td>
        <td>
          <a href="<%= build.link_to_remote_commit %>" target="_blank" class="commit-sha">
            <%= build.human_friendly_branch_information %>
          </a>
        </td>
        <td>
          <%= erb :"../../global/trigger_job_button", locals: { project: project, build: build, disabled: false } %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<style type="text/css">
  .commit-sha {
    border: 1px solid #ED5281;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    background-color: rgba(237, 82, 129, 0.02);
  }
</style>
